package com.jiaeda.springsecurity.controller;

import com.jiaeda.springsecurity.config.MyUserDetailsService;
import com.jiaeda.springsecurity.properties.SecurityProperties;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.authority.AuthorityUtils;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by chengchaopeng on 2018/7/9.
 */
@Controller
@RequestMapping("/user")
public class UserController {

    @GetMapping("/me")
    @ResponseBody
    public String me(){
        return "第一个页面！";
    }

    /**
     * 显示用户登录页面
     * @return
     */
    @GetMapping("/signIn")
    public String login(){
        return "signIn";
    }
}
